package main

import "fmt"

func test1() (ret string) {
	defer func() {
		ret += "defer"
	}()
	return "abc"
}
func test2() string {
	var ret = "abc"
	defer func() {
		ret += "defer"
		fmt.Println(ret)
	}()
	return ret
}

func main() {
	var s = test1()
	fmt.Println("test1 return ", s)
	var s1 = test2()
	fmt.Println("test2 return ", s1)
}
